package com.cml.common.constant;

/**
 * 姓名：陈茂林
 * 时间：j 14:36
 * 描述：
 */
public class NodeStatus {
    public  static  final  String NODE_INIT="init";

    public  static  final  String NODE_RUN="run";

    public  static  final  String NODE_SHUTDOWN="shutdown";

    public  static  final  String NODE_FAIL="fail";

    public  static  final  String NODE_HA="HA";

    private String curStatus;

    private static  NodeStatus NODE_STATUS = new NodeStatus();

    private NodeStatus(){}

    public static NodeStatus getInstance(){
        return NodeStatus.NODE_STATUS;
    }

    public String getCurStatus() {
        return curStatus;
    }

    public void setCurStatus(String curStatus) {
        this.curStatus = curStatus;
    }

    public boolean isRunning(){
        return NodeStatus.NODE_RUN.equals(this.getCurStatus()) || NodeStatus.NODE_HA.equals(this.getCurStatus());
    }

}
